import request from '@/utils/request'

// 菜单列表
export function getMenuList(params) {
  return request({
    url: '/menu/findList',
    method: 'post',
    params
  })
}

// 创建菜单
export function addMenu(params) {
  return request({
    url: '/menu/add',
    method: 'post',
    params
  })
}

// 编辑菜单
export function editMenu(data) {
  return request({
    url: '/menu/update',
    method: 'post',
    data
  })
}

// 删除菜单
export function removeMenu(data) {
  return request({
    url: '/menu/delete',
    method: 'post',
    data
  })
}

// 分配菜单
export function assignMenu(data) {
  return request({
    url: '/menu/allot',
    method: 'post',
    data
  })
}
